home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume12 / cake / part06 < prev    next >
Encoding:
Internet Message Format  |  1987-10-15  |  46.0 KB

  1. Subject:  v12i012:  Cake, a make replacement, Part06/09
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rs@uunet.UU.NET
  5.  
  6. Submitted-by: Zoltan Somogyi <zs@munnari.oz>
  7. Posting-number: Volume 12, Issue 12
  8. Archive-name: cake/part06
  9.  
  10. #! /bin/sh
  11. # This is a shell archive, meaning:
  12. # 1. Remove everything above the #! /bin/sh line.
  13. # 2. Save the resulting text in a file.
  14. # 3. Execute the file with /bin/sh (not csh) to create:
  15. #    README
  16. #    Archive
  17. #    C
  18. #    Grammar
  19. #    Lex
  20. #    Main
  21. #    Newtext
  22. #    Newtext.defs
  23. #    Newtext.doc
  24. #    Nuprolog
  25. #    Rcs
  26. #    Sccs
  27. #    System
  28. #    Text
  29. #    Textdefs
  30. #    Uas
  31. #    Vlsi
  32. #    Yacc
  33. #    Zs_defs
  34. #    Zs_newdefs
  35. # This archive created: Wed Oct 14 20:46:47 1987
  36. echo mkdir Lib
  37. mkdir Lib
  38. echo cd Lib
  39. cd Lib
  40. export PATH; PATH=/bin:/usr/bin:$PATH
  41. echo shar: "extracting 'README'" '(1351 characters)'
  42. if test -f 'README'
  43. then
  44.     echo shar: "will not over-write existing file 'README'"
  45. else
  46. sed 's/^X//' << \SHAR_EOF > 'README'
  47. XThis directory contains some "standard" cakefiles.
  48. X
  49. XEach cakefile has its own documentation, except Newtext, for which the
  50. Xdocumentation is in Newtext.defs and Newtext.doc. Many cakefiles need
  51. Xthe programs and shell- and awk-scripts distributed with cake.
  52. X
  53. XIt contains cakefiles for C programs, yacc and lex either separately
  54. X(the files Yacc, Lex) or together (Grammar), and for NU-Prolog programs.
  55. XThese can be used together with the cakefiles Main or System, which
  56. Xlook after linking, checking, printing etc, for directories with one
  57. Xand many executables respectively.
  58. X
  59. XThe cakefile Newtext is a fairly general-purpose text-processing system
  60. Xfor ditroff. You should go through this file and modify any default
  61. Xvalues which are not appropriate for your site; the names of the
  62. Xprinters in particular are site-dependent.
  63. X
  64. XThe cakefile Text is an older version of Newtext; you should probably
  65. Xthrow it away and rename Newtext to Text. The cakefiles Zs_* are
  66. Xsite-dependent definitions for Text and Newtext. You may want to
  67. Xlook at them, and perhaps modify them, but it is unlikely that they
  68. Xwill be very useful as they are.
  69. X
  70. XThe Vlsi cakefile (for the UNSW VLSI system) does the job of the
  71. XUNSW "bake" program.
  72. X
  73. XThis directory also contains cakefiles for RCS, SCCS and "ar",
  74. Xas well as for my (zs's) microassembler; if you want a copy of uas,
  75. Xjust ask.
  76. SHAR_EOF
  77. if test 1351 -ne "`wc -c < 'README'`"
  78. then
  79.     echo shar: "error transmitting 'README'" '(should have been 1351 characters)'
  80. fi
  81. fi
  82. echo shar: "extracting 'Archive'" '(397 characters)'
  83. if test -f 'Archive'
  84. then
  85.     echo shar: "will not over-write existing file 'Archive'"
  86. else
  87. sed 's/^X//' << \SHAR_EOF > 'Archive'
  88. X$    Cakefile to handle archives.
  89. X
  90. X$    Define ARCH to be the name of the archive you want files
  91. X$    to be automatically extracted from. The first rule performs
  92. X$    this extraction; the second updates the archive.
  93. X
  94. X#ifndef    ARCH
  95. X        it's no use trying to use Archive without defining ARCH
  96. X#endif
  97. X
  98. X%1:        ARCH        if {{ar t ARCH | grep \\\^%1\\\$}}
  99. X        ar x ARCH %1
  100. X
  101. XARCH.up&:    [[ar t ARCH]]
  102. X        ar ru ARCH [[ar t ARCH]]
  103. SHAR_EOF
  104. if test 397 -ne "`wc -c < 'Archive'`"
  105. then
  106.     echo shar: "error transmitting 'Archive'" '(should have been 397 characters)'
  107. fi
  108. fi
  109. echo shar: "extracting 'C'" '(1857 characters)'
  110. if test -f 'C'
  111. then
  112.     echo shar: "will not over-write existing file 'C'"
  113. else
  114. sed 's/^X//' << \SHAR_EOF > 'C'
  115. X$    Cakefile to handle C programs.
  116. X
  117. X$    The value of the macro CC names the C compiler. The values
  118. X$    of the macros CPPFLAGS, CFLAGS and LDFLAGS are passed on to
  119. X$    cpp, cc and ld respectively. By default, the object file
  120. X$    depends only on the source file. This can be changed. You
  121. X$    should define DEPCCINCL if you want the .o file to depend
  122. X$    on the files included in .c; the value of CCINCLFLAGS will
  123. X$    be passed along to ccincl. You may define DEPHDR instead,
  124. X$    in which case the .o file will depend on either the files
  125. X$    named in the macro HDR (without the .h suffix), or on all
  126. X$    the .h files in the current directory. In any case, you
  127. X$    may define OBJDEP yourself.
  128. X
  129. X$    This cakefile was written to work in conjunction with the
  130. X$    cakefile Grammar (or Lex and Yacc) and the cakefile Main
  131. X$    or System. The order of inclusion of these should be e.g.
  132. X$    Grammar, C, and Main.
  133. X
  134. X#ifndef    CC
  135. X#define    CC        cc
  136. X#endif
  137. X#ifndef    CPPFLAGS
  138. X#define    CPPFLAGS
  139. X#endif
  140. X#ifndef    CFLAGS
  141. X#define    CFLAGS
  142. X#endif
  143. X#ifndef    LINTFLAGS
  144. X#define    LINTFLAGS
  145. X#endif
  146. X#ifndef    LDFLAGS
  147. X#define    LDFLAGS
  148. X#endif
  149. X#ifndef    OBJDEP
  150. X# ifdef    DEPCCINCL
  151. X#  ifndef    CCINCLFLAGS
  152. X#   define    CCINCLFLAGS
  153. X#  endif
  154. X#  define    OBJDEP        [[ccincl CCINCLFLAGS %.c]]
  155. X#  define    WHENFLAG    *
  156. X# else
  157. X#  ifdef    DEPHDR
  158. X#   ifdef    HDR
  159. X#    define    OBJDEP        [[sub X X.h HDR]]
  160. X#   else
  161. X#    define    OBJDEP        [[ls *.h]]
  162. X#   endif
  163. X#  else
  164. X#   define OBJDEP
  165. X#  endif
  166. X# endif
  167. X#endif
  168. X#ifndef    WHENFLAG
  169. X#define    WHENFLAG
  170. X#endif
  171. X
  172. X%.o:    %.c WHENFLAG OBJDEP
  173. X    CC CPPFLAGS CFLAGS -c %.c
  174. X
  175. X#define    LINK_CMD    CC LDFLAGS -o %
  176. X#define    CHECK_CMD    lint CPPFLAGS LINTFLAGS
  177. X#define    TAGS_CMD    ctags
  178. X#define    DEFS_CMD    defn
  179. X
  180. X#define    SRCSUFF    .c
  181. X#define    OBJSUFF .o
  182. X
  183. X#ifndef    SUFFIXLIST
  184. X#ifdef    USE_YACC
  185. X#ifdef    USE_LEX
  186. X#define    SUFFIXLIST    .c .l .y
  187. X#else
  188. X#define    SUFFIXLIST    .c .y
  189. X#endif
  190. X#else
  191. X#ifdef    USE_LEX
  192. X#define    SUFFIXLIST    .c .l
  193. X#else
  194. X#define    SUFFIXLIST    .c
  195. X#endif
  196. X#endif
  197. X#endif
  198. SHAR_EOF
  199. if test 1857 -ne "`wc -c < 'C'`"
  200. then
  201.     echo shar: "error transmitting 'C'" '(should have been 1857 characters)'
  202. fi
  203. fi
  204. echo shar: "extracting 'Grammar'" '(1436 characters)'
  205. if test -f 'Grammar'
  206. then
  207.     echo shar: "will not over-write existing file 'Grammar'"
  208. else
  209. sed 's/^X//' << \SHAR_EOF > 'Grammar'
  210. X$    Cakefile to handle coupled lex and yacc files.
  211. X
  212. X$    This file assumes that yacc sources are in files whose names
  213. X$    are of the form %_g.y (the g is for grammar) and that lex
  214. X$    sources are in files whose names are of the form %_s.l (the
  215. X$    s is for scanner). It assumes that yacc and lex sources occur
  216. X$    in pairs, i.e. %_g.y and %_s.l for the same value of %.
  217. X$    It renames the output files of yacc and lex so that they
  218. X$    have the same basename as their source files, and it massages
  219. X$    the generated sources using yyrepl(1). This enables one to put
  220. X$    more than one parser/scanner pair in the same directory without
  221. X$    conflict over yy* variables. You should define the macro TABLES
  222. X$    if you wish to keep the tables generated by the -v options
  223. X$    of yacc and lex.
  224. X
  225. X$    This cakefile was written to work with the cakefile C and one
  226. X$    of the cakefiles Main and System.
  227. X
  228. X#ifdef    TABLES
  229. X#define    YFLAGS    -dv
  230. X#define    LFLAGS    -v
  231. X
  232. X%_g.c^ %_g.h@ %_g.t:    %_g.y
  233. X            yacc YFLAGS %_g.y
  234. X            @mv y.tab.h %_g.h
  235. X            @mv y.tab.c %_g.c
  236. X            @mv y.output %_g.t
  237. X            @yyrepl %_g.y %_g.c %_g.h
  238. X
  239. X%_s.c^ %_s.t:        %_s.l %_g.h
  240. X            lex LFLAGS %_s.l > %_s.t
  241. X            @mv lex.yy.c %_s.c
  242. X            @yyrepl %_g.y %_s.c
  243. X#else
  244. X#define    YFLAGS    -d
  245. X#define    LFLAGS
  246. X
  247. X%_g.c^ %_g.h@:        %_g.y
  248. X            yacc YFLAGS %_g.y
  249. X            @mv y.tab.h %_g.h
  250. X            @mv y.tab.c %_g.c
  251. X            @yyrepl %_g.y %_g.c %_g.h
  252. X
  253. X%_s.c^:            %_s.l %_g.h
  254. X            lex LFLAGS %_s.l
  255. X            @mv lex.yy.c %_s.c
  256. X            @yyrepl %_g.y %_s.c
  257. X#endif
  258. X
  259. X#define    USE_YACC
  260. X#define    USE_LEX
  261. SHAR_EOF
  262. if test 1436 -ne "`wc -c < 'Grammar'`"
  263. then
  264.     echo shar: "error transmitting 'Grammar'" '(should have been 1436 characters)'
  265. fi
  266. fi
  267. echo shar: "extracting 'Lex'" '(397 characters)'
  268. if test -f 'Lex'
  269. then
  270.     echo shar: "will not over-write existing file 'Lex'"
  271. else
  272. sed 's/^X//' << \SHAR_EOF > 'Lex'
  273. X$    Cakefile to handle lex files.
  274. X
  275. X$    It renames the output file of lex so that it has the same
  276. X$    basename as the source file. The value of the macro LFLAGS
  277. X$    is passed on to lex.
  278. X
  279. X$    This cakefile was written to work with the cakefile C and one
  280. X$    of the cakefiles Main and System.
  281. X
  282. X#ifndef    LFLAGS
  283. X#define    LFLAGS
  284. X#endif
  285. X
  286. X%.c^:        %.l             if exist %.l
  287. X        lex LFLAGS %.l
  288. X        @mv lex.yy.c %.c
  289. X
  290. X#define    USE_LEX
  291. SHAR_EOF
  292. if test 397 -ne "`wc -c < 'Lex'`"
  293. then
  294.     echo shar: "error transmitting 'Lex'" '(should have been 397 characters)'
  295. fi
  296. fi
  297. echo shar: "extracting 'Main'" '(3153 characters)'
  298. if test -f 'Main'
  299. then
  300.     echo shar: "will not over-write existing file 'Main'"
  301. else
  302. sed 's/^X//' << \SHAR_EOF > 'Main'
  303. X$    Cakefile to handle programs.
  304. X
  305. X$    Using Main is appropriate if a directory contains the sources
  306. X$    for a single binary; if the number of binaries is greater than
  307. X$    one, you should use the cakefile System. Main (and System) can
  308. X$    handle programs written in any language, as long as the cakefile
  309. X$    for that language defines the macros expected by Main. These
  310. X$    macros are LINK_CMD, SRCSUFF, OBJSUFF and SUFFIXLIST. Currently
  311. X$    there exist cakefiles for C and NU-Prolog. These cakefile should
  312. X$    be included before Main.
  313. X
  314. X$    You should define the macro FILES to contain the list of source
  315. X$    files WITHOUT their suffix, and optionally MAIN as the name of
  316. X$    the binary (default: the name of the first file in FILES).
  317. X$    With these defined, you can make the targets MAIN (link the
  318. X$    object files), print (print all sources), uprint (print those
  319. X$    sources which were modified after the last printing), count
  320. X$    (run wc on all sources), ssize (sort the output of wc),
  321. X$    clean (remove generated files) and clobber (remove generated
  322. X$    files and the binary). Printing is done by PRINT_CMD if
  323. X$    defined, lpr -p otherwise; removal is done by RM_CMD if
  324. X$    defined, rmv otherwise (rmv copies its args to /tmp).
  325. X
  326. X$    You may define DEST as the name of an installation directory
  327. X$    or HOME as where HOME/bin is the installation directory,
  328. X$    and you can invoke the target install to do the installation
  329. X$    (using INST_CMD if defined, cp otherwise). You may define
  330. X$    LIB as a list of libraries to pass on to LINK and CHECK CMDs.
  331. X
  332. X$    The rules for the targets lint, tags and defs depend on
  333. X$    values for the macros CHECK_CMD, TAGS_CMD and DEFS_CMD,
  334. X$    which should be language-specific utilities; the macros
  335. X$    should be defined in the language's cakefile.
  336. X
  337. X#ifndef    FILES
  338. X    it's no use trying to use Main without defining FILES
  339. X#endif
  340. X#ifndef    LINK_CMD
  341. X    it's no use trying to use Main without defining LINK_CMD
  342. X#endif
  343. X#ifndef    SRCSUFF
  344. X    it's no use trying to use Main without defining SRCSUFF
  345. X#endif
  346. X#ifndef    OBJSUFF
  347. X    it's no use trying to use Main without defining OBJSUFF
  348. X#endif
  349. X#ifndef    SUFFIXLIST
  350. X    it's no use trying to use Main without defining SUFFIXLIST
  351. X#endif
  352. X
  353. X#ifndef    PRINT_CMD
  354. X#define    PRINT_CMD    lpr -p
  355. X#endif
  356. X#ifndef    INST_CMD
  357. X#define    INST_CMD    cp
  358. X#endif
  359. X#ifndef    RM_CMD
  360. X#define    RM_CMD        rmv
  361. X#endif
  362. X
  363. X#ifndef    MAIN
  364. X#define    MAIN        [[echo FILES | awk '{ print $1; }']]
  365. X#endif
  366. X#ifndef    LIB
  367. X#define    LIB
  368. X#endif
  369. X
  370. X#define    SRC    [[sub X X''SRCSUFF FILES]]
  371. X#define    OBJ    [[sub X X''OBJSUFF FILES]]
  372. X
  373. X%::        OBJ            if % in MAIN
  374. X        LINK_CMD OBJ LIB
  375. X
  376. X#ifdef    DEST
  377. Xinstall&:    MAIN
  378. X        INST_CMD MAIN DEST
  379. X#else
  380. X#ifdef    HOME
  381. Xinstall&:    MAIN
  382. X        INST_CMD MAIN HOME/bin
  383. X#endif
  384. X#endif
  385. X
  386. X#ifdef    CHECK_CMD
  387. X#ifdef    IRREL
  388. Xlint&:        SRC
  389. X        CHECK_CMD SRC LIB |& irrel IRREL
  390. X#else
  391. Xlint&:        SRC
  392. X        CHECK_CMD SRC LIB
  393. X#endif
  394. X#endif
  395. X
  396. Xprint&:
  397. X        PRINT_CMD [[usrc SUFFIXLIST FILES]]
  398. X        @-touch .print
  399. X
  400. Xuprint&:
  401. X        PRINT_CMD [[later .print [[usrc SUFFIXLIST FILES]]]]
  402. X        @-touch .print
  403. X
  404. X#ifdef    TAGS_CMD
  405. Xtags:        SRC
  406. X        TAGS_CMD SRC
  407. X#endif
  408. X
  409. X#ifdef    DEFS_CMD
  410. Xdefs:        SRC
  411. X        DEFS_CMD SRC
  412. X#endif
  413. X
  414. Xcount&:
  415. X        wc -v [[usrc SUFFIXLIST FILES]]
  416. X
  417. Xssize&:
  418. X        ssize [[usrc SUFFIXLIST FILES]]
  419. X
  420. Xclean&:
  421. X        RM_CMD OBJ [[gsrc SUFFIXLIST FILES]]
  422. X
  423. Xclobber&:    clean
  424. X        RM_CMD MAIN
  425. SHAR_EOF
  426. if test 3153 -ne "`wc -c < 'Main'`"
  427. then
  428.     echo shar: "error transmitting 'Main'" '(should have been 3153 characters)'
  429. fi
  430. fi
  431. echo shar: "extracting 'Newtext'" '(7630 characters)'
  432. if test -f 'Newtext'
  433. then
  434.     echo shar: "will not over-write existing file 'Newtext'"
  435. else
  436. sed 's/^X//' << \SHAR_EOF > 'Newtext'
  437. X$    New cakefile for text processing.
  438. X
  439. X$    For documentation see Newtext.doc and Newtext.defs.
  440. X
  441. X#ifndef    MOREFLAG
  442. X#define    MOREFLAG
  443. X#endif
  444. X#ifndef    PRINTFLAG
  445. X#define    PRINTFLAG
  446. X#endif
  447. X
  448. X#ifndef    MORECMD
  449. X#define    MORECMD        more
  450. X#endif
  451. X#ifndef    BIBCMD
  452. X#define    BIBCMD        bib
  453. X#endif
  454. X#ifndef    PICCMD
  455. X#define    PICCMD        pic
  456. X#endif
  457. X#ifndef    TBLCMD
  458. X#define    TBLCMD        dtbl
  459. X#endif
  460. X#ifndef    EQNCMD
  461. X#define    EQNCMD        deqn
  462. X#endif
  463. X#ifndef    DITROFFCMD
  464. X#ifdef    LOCALDITROFF
  465. X#define    DITROFFCMD    ditroff.q
  466. X#else
  467. X#define    DITROFFCMD    ditroff
  468. X#endif
  469. X#endif
  470. X#ifndef    CITCMD
  471. X#define    CITCMD        lookindex -s
  472. X#endif
  473. X
  474. X#ifndef    SYMBOLIMAGEN
  475. X#define    SYMBOLIMAGEN
  476. X#endif
  477. X#ifndef    SYMBOLAPPLE
  478. X#define    SYMBOLAPPLE
  479. X#endif
  480. X#ifndef    LASERDEV
  481. X#ifdef    IP
  482. X#define    LASERDEV    -Pip
  483. X#define    LASERTYPE    -Tip
  484. X#define    SYMBOLS        SYMBOLIMAGEN
  485. X#else
  486. X#ifdef    LW
  487. X#define    LASERDEV    -Plw
  488. X#define    LASERTYPE    -Tlw
  489. X#define    CHUNK        6
  490. X#define    SYMBOLS        SYMBOLAPPLE
  491. X#else
  492. X#ifdef    LWR
  493. X#define    LASERDEV    -Plwr
  494. X#define    LASERTYPE    -Tlw
  495. X#define    CHUNK        6
  496. X#define    SYMBOLS        SYMBOLAPPLE
  497. X#else
  498. X#ifdef    LW226
  499. X#define    LASERDEV    -Plw.226
  500. X#define    LASERTYPE    -Tlw
  501. X#define    CHUNK        6
  502. X#define    SYMBOLS        SYMBOLAPPLE
  503. X#else
  504. X#ifdef    OFF
  505. X#define    LASERDEV    -Poff
  506. X#define    LASERTYPE    -Tlw
  507. X#define    CHUNK        6
  508. X#define    SYMBOLS        SYMBOLAPPLE
  509. X#else
  510. X#ifdef    AN
  511. X#define    LASERDEV    -Pan
  512. X#define    LASERTYPE    -Tlw
  513. X#define    CHUNK        6
  514. X#define    SYMBOLS        SYMBOLAPPLE
  515. X#else
  516. X#define    LASERDEV    -Pan
  517. X#define    LASERTYPE    -Tlw
  518. X#define    CHUNK        6
  519. X#define    SYMBOLS        SYMBOLAPPLE
  520. X#endif
  521. X#endif
  522. X#endif
  523. X#endif
  524. X#endif
  525. X#endif
  526. X#endif
  527. X
  528. X#ifndef    PRINTLASER
  529. X#define    PRINTLASER    LASERDEV -n
  530. X#endif
  531. X#ifndef    PRINTGEN
  532. X#define    PRINTGEN    LASERDEV
  533. X#endif
  534. X#ifndef    LBLOPTS
  535. X#define    LBLOPTS
  536. X#endif
  537. X#ifndef    ALLLBLOPTS
  538. X#define    ALLLBLOPTS    LBLOPTS
  539. X#endif
  540. X#ifndef    BIBINDEX
  541. X#define    BIBINDEX    -p INDEX
  542. X#endif
  543. X#ifndef    BIBSTYLE
  544. X#define    BIBSTYLE    -t std
  545. X#endif
  546. X#ifndef    BIBOPTS
  547. X#define    BIBOPTS
  548. X#endif
  549. X#ifndef    ALLBIBOPTS
  550. X#define    ALLBIBOPTS    BIBINDEX BIBSTYLE BIBOPTS
  551. X#endif
  552. X#ifndef    LISTREFOPTS
  553. X#define    LISTREFOPTS
  554. X#endif
  555. X#ifndef    ALLLISTREFOPTS
  556. X#define    ALLLISTREFOPTS    BIBSTYLE LISTREFOPTS
  557. X#endif
  558. X#ifndef    PICOPTS
  559. X#define    PICOPTS
  560. X#endif
  561. X#ifndef    ALLPICOPTS
  562. X#define    ALLPICOPTS    LASERTYPE PICOPTS
  563. X#endif
  564. X#ifndef    TBLOPTS
  565. X#define    TBLOPTS
  566. X#endif
  567. X#ifndef    ALLTBLOPTS
  568. X#define    ALLTBLOPTS    LASERTYPE TBLOPTS
  569. X#endif
  570. X#ifndef    EQNOPTS
  571. X#define    EQNOPTS
  572. X#endif
  573. X#ifndef    ALLEQNOPTS
  574. X#define    ALLEQNOPTS    LASERTYPE EQNOPTS
  575. X#endif
  576. X#ifndef    MACROPACK
  577. X#define    MACROPACK    -me
  578. X#endif
  579. X#ifndef    OTHERMACS
  580. X#define    OTHERMACS
  581. X#endif
  582. X#ifndef    DITROFFINIT
  583. X#define    DITROFFINIT
  584. X#endif
  585. X#ifndef    DITROFFOPTS
  586. X#define    DITROFFOPTS
  587. X#endif
  588. X#ifndef    ALLDITROFFOPTS
  589. X#define    ALLDITROFFOPTS    -t LASERDEV DITROFFOPTS MACROPACK OTHERMACS SYMBOLS DITROFFINIT
  590. X#endif
  591. X#ifndef    CITINDEX
  592. X#define    CITINDEX    /usr/bib/gnu/bib/INDEX
  593. X#endif
  594. X#ifndef    CHNROPTS
  595. X#define    CHNROPTS
  596. X#endif
  597. X#ifndef    CHEQOPTS
  598. X#define    CHEQOPTS
  599. X#endif
  600. X#ifndef    SPELLDICT
  601. X#define    SPELLDICT    /dev/null
  602. X#endif
  603. X#ifndef    ISPELLOPTS    
  604. X#define    ISPELLOPTS    -Sx
  605. X#endif
  606. X#ifndef    SPELLOPTS
  607. X#define    SPELLOPTS
  608. X#endif
  609. X#ifndef    DICTOPTS
  610. X#define    DICTOPTS
  611. X#endif
  612. X#ifndef    MODSTYLE
  613. X#define    MODSTYLE    16
  614. X#endif
  615. X#ifndef    HARDSTYLE
  616. X#define    HARDSTYLE    19
  617. X#endif
  618. X#ifndef    LONGSTYLE
  619. X#define    LONGSTYLE    25
  620. X#endif
  621. X#ifndef    STYLEOPTS
  622. X#define    STYLEOPTS
  623. X#endif
  624. X#ifndef    ALLSTYLEOPTS
  625. X#define    ALLSTYLEOPTS    MACROPACK STYLEOPTS
  626. X#endif
  627. X
  628. X#ifndef    IDIR
  629. X#define    IDIR    /tmp
  630. X#endif
  631. X#ifndef    FDIR
  632. X#define    FDIR    /tmp
  633. X#endif
  634. X
  635. X#define    FSUFF    laser
  636. X#define    ISUFF    bib,lbl,dte,de,d
  637. X#define    ASUFF    astyle,base,cheq,chnr,cit,count,dict,exp,hard,long,mod,ocount,ol,pass,refs,spell,srefs,style
  638. X
  639. X#define    need(prog)    prog in [[needed %.orig]]
  640. X
  641. X/* general services */
  642. X%.m&:        % MOREFLAG
  643. X        MORECMD %
  644. X
  645. X%1.%2.p&:    %1.%2 PRINTFLAG            if not %2 in laser
  646. X        lpr PRINTGEN %1.%2
  647. X
  648. X#ifdef    CHUNK
  649. X%1.%2.p&:    %1.%2 PRINTFLAG            if %2 in laser
  650. X        @-/bin/rm -f chunk* >& /dev/null
  651. X        troffchunk -n CHUNK %1.%2
  652. X        lpr PRINTLASER chunk*
  653. X#else
  654. X%1.%2.p&:    %1.%2 PRINTFLAG            if %2 in laser
  655. X        lpr PRINTLASER %1.%2
  656. X#endif
  657. X
  658. X/* frames */
  659. X%.orig:        %.frame [[soincl %.frame]]    if exist %.frame
  660. X        soelim %.frame > %.orig
  661. X
  662. X%1.%2.each&:    [[sub X.orig X.%2 [[soincl %1.frame]]]]    if exist %1.frame
  663. X
  664. X/* lbl */
  665. X#ifdef    IDIR
  666. X%.lbl:        %.orig*                if need(lbl)
  667. X        lbl ALLLBLOPTS %.orig > IDIR/%.lbl
  668. X        ln -s IDIR/%.lbl .
  669. X#else
  670. X%.lbl:        %.orig*                if need(lbl)
  671. X        lbl ALLLBLOPTS %.orig > %.lbl
  672. X#endif
  673. X
  674. X%.lbl:        %.orig*                if not need(lbl)
  675. X        @-/bin/rm -f %.lbl >& /dev/null
  676. X        ln -s [[/bin/pwd]]/%.orig %.lbl
  677. X
  678. X/* bib */
  679. X#ifdef    IDIR
  680. X%.bib:        %.lbl %.orig*            if need(bib)
  681. X        @-/bin/rm -f %.bib >& /dev/null
  682. X        BIBCMD ALLBIBOPTS %.lbl > IDIR/%.bib
  683. X        ln -s IDIR/%.bib .
  684. X#else
  685. X%.bib:        %.lbl %.orig*            if need(bib)
  686. X        BIBCMD ALLBIBOPTS %.lbl > %.bib
  687. X#endif
  688. X
  689. X#ifdef    IDIR
  690. X%.bib:        %.lbl %.orig*            if need(listrefs)
  691. X        @-/bin/rm -f %.bib >& /dev/null
  692. X        listrefs LISTREFOPTS %.lbl > IDIR/%.bib
  693. X        ln -s IDIR/%.bib .
  694. X#else
  695. X%.bib:        %.lbl %.orig*            if need(listrefs)
  696. X        listrefs LISTREFOPTS %.lbl > %.bib
  697. X#endif
  698. X
  699. X%.bib:        %.lbl %.orig*            if not need(bib) and not need(listrefs)
  700. X        @-/bin/rm -f %.bib >& /dev/null
  701. X        ln -s %.lbl %.bib
  702. X
  703. X/* laser pic */
  704. X#ifdef    IDIR
  705. X%.dte INTFLAG:    %.bib %.orig*            if need(pic)
  706. X        @-/bin/rm -f %.dte >& /dev/null
  707. X        PICCMD ALLPICOPTS %.bib > IDIR/%.dte
  708. X        ln -s IDIR/%.dte .
  709. X#else
  710. X%.dte INTFLAG:    %.bib %.orig*            if need(pic)
  711. X        PICCMD ALLPICOPTS %.bib > %.dte
  712. X#endif
  713. X
  714. X%.dte INTFLAG:    %.bib %.orig*            if not need(pic)
  715. X        @-/bin/rm -f %.dte >& /dev/null
  716. X        ln -s %.bib %.dte
  717. X    
  718. X/* laser tbl */
  719. X#ifdef    IDIR
  720. X%.de INTFLAG:    %.dte %.orig*            if need(tbl)
  721. X        @-/bin/rm -f %.de >& /dev/null
  722. X        TBLCMD ALLTBLOPTS %.dte > IDIR/%.de
  723. X        ln -s IDIR/%.de .
  724. X#else
  725. X%.de INTFLAG:    %.dte %.orig*            if need(tbl)
  726. X        TBLCMD ALLTBLOPTS %.dte > %.de
  727. X#endif
  728. X
  729. X%.de INTFLAG:    %.dte %.orig*            if not need(tbl)
  730. X        @-/bin/rm -f %.de >& /dev/null
  731. X        ln -s %.dte %.de
  732. X    
  733. X/* laser eqn */
  734. X#ifdef    IDIR
  735. X%.d INTFLAG:    %.de %.orig*            if need(eqn)
  736. X        @-/bin/rm -f %.d >& /dev/null
  737. X        EQNCMD ALLEQNOPTS %.de > IDIR/%.d
  738. X        ln -s IDIR/%.d .
  739. X#else
  740. X%.d INTFLAG:    %.de %.orig*            if need(eqn)
  741. X        EQNCMD ALLEQNOPTS %.de > %.d
  742. X#endif
  743. X
  744. X%.d INTFLAG:    %.de %.orig*            if not need(eqn)
  745. X        @-/bin/rm -f %.d >& /dev/null
  746. X        ln -s %.de %.d
  747. X    
  748. X/* laser troff */
  749. X#ifdef    FDIR
  750. X%.laser:    %.d
  751. X        @-/bin/rm -f %.laser >& /dev/null
  752. X        DITROFFCMD ALLDITROFFOPTS %.d > FDIR/%.laser
  753. X        ln -s FDIR/%.laser .
  754. X#else
  755. X%.laser:    %.d
  756. X        DITROFFCMD ALLDITROFFOPTS %.d > %.laser
  757. X#endif
  758. X
  759. X/* analysis services */
  760. X%.all&:        %.spell %.style %.exp %.mod %.long %.pass %.dict %.chnr
  761. X
  762. X%.base:        %.orig
  763. X        base < %.orig > %.base
  764. X
  765. X%.refs:        %.orig
  766. X        refs < %.orig > %.refs
  767. X
  768. X%.srefs:    %.refs
  769. X        sort -u %.refs > %.srefs
  770. X
  771. X%.cit:        %.srefs
  772. X        CITCMD CITINDEX < %.srefs > %.icit
  773. X        sortbib %.icit > %.cit
  774. X        @-/bin/rm -f %.icit >& /dev/null
  775. X
  776. X%.chnr:        %.orig
  777. X        checknr CHNROPTS %.orig > %.chnr
  778. X
  779. X%.cheq:        %.orig
  780. X        -checkeq CHEQOPTS %.orig > %.cheq
  781. X
  782. X%.ol:        %.orig
  783. X        ol %.orig > %.ol
  784. X
  785. X%.fix&:        %.orig
  786. X        fix -d SPELLDICT %.orig
  787. X
  788. X%.ispell&:    %.orig
  789. X        ispell ISPELLOPTS %.orig
  790. X
  791. X%.spell:    %.base
  792. X        spell SPELLOPTS %.base | tr A-Z a-z | comm -23 - SPELLDICT > %.spell
  793. X
  794. X%.dict:        %.base
  795. X        diction DICTOPTS %.base > %.dict
  796. X
  797. X%.style:    %.base
  798. X        style ALLSTYLEOPTS %.base > %.style
  799. X
  800. X%.astyle:    %.base
  801. X        style ALLSTYLEOPTS -a %.base > %.astyle
  802. X
  803. X%.exp:        %.base
  804. X        style ALLSTYLEOPTS -e %.base > %.exp
  805. X
  806. X%.mod:        %.base
  807. X        style ALLSTYLEOPTS -r MODSTYLE %.base > %.mod
  808. X
  809. X%.hard:        %.base
  810. X        style ALLSTYLEOPTS -r HARDSTYLE %.base > %.hard
  811. X
  812. X%.long:        %.base
  813. X        style ALLSTYLEOPTS -l LONGSTYLE %.base > %.long
  814. X
  815. X%.pass:        %.base
  816. X        style ALLSTYLEOPTS -p %.base > %.pass
  817. X
  818. X%.count:    %.base
  819. X        wc %.base > %.count
  820. X
  821. X%.ocount:    %.orig
  822. X        wc %.orig > %.ocount
  823. X
  824. X%.clean&:
  825. X        @echo cleaning up %
  826. X        @-/bin/rm %.{ISUFF,FSUFF,ASUFF} >& /dev/null
  827. X
  828. X%.vclean&:
  829. X        @echo cleaning up % very carefully
  830. X        @-/bin/mv %.orig /tmp/%.orig.$$ >& /dev/null
  831. X
  832. Xxyzzy&:
  833. X        @echo no default action in Newtext
  834. X
  835. Xclean&:        [[sub -i X.orig X.clean *]]
  836. Xclean&:        [[sub -i X.frame X.vclean *]]
  837. SHAR_EOF
  838. if test 7630 -ne "`wc -c < 'Newtext'`"
  839. then
  840.     echo shar: "error transmitting 'Newtext'" '(should have been 7630 characters)'
  841. fi
  842. fi
  843. echo shar: "extracting 'Newtext.defs'" '(2178 characters)'
  844. if test -f 'Newtext.defs'
  845. then
  846.     echo shar: "will not over-write existing file 'Newtext.defs'"
  847. else
  848. sed 's/^X//' << \SHAR_EOF > 'Newtext.defs'
  849. XThis file lists and defines the macros used by the cakefile Newtext.
  850. X
  851. XSYMBOLIMAGEN    Files containing symbol definitions for imagens
  852. XSYMBOLAPPLE    and laserwriters; defaults are empty.
  853. X
  854. XLASERDEV    If you define LASERDEV (as -Pip etc), you should
  855. XLASERTYPE    also define LASERTYPE and SYMBOLS. Otherwise,
  856. XSYMBOLS        Text will define them, based on the presence
  857. X
  858. XIP        of one of these macros. IP directs output to
  859. XLW        the imagen, LW to the computation lab, LW226
  860. XLW226        to 226, LWR to to the computation lab (rotated),
  861. XLWR        OFF to the office, and AN to the annexe. Only
  862. XOFF        the first of these definitions has any effect.
  863. XAN        AN is the default. (These are site-dependent.)
  864. X
  865. XPRINTGEN    Argument to lpr for printing general stuff.
  866. XPRINTLASER    Argument to lpr for printing ditroff output.
  867. X
  868. XLBLOPTS        All these options are given to the program
  869. XBIBOPTS        from whose name they are derived. The defaults
  870. XLISTREFOPTS    are empty strings.
  871. XPICOPTS
  872. XTBLOPTS
  873. XEQNOPTS
  874. XDITROFFOPTS
  875. XCHEQOPTS
  876. XCHNROPTS
  877. XSPELLOPTS
  878. XISPELLOPTS
  879. XDICTOPTS
  880. XSTYLEOPTS
  881. X
  882. XBIBINDEX    These are the "required" options of bib.
  883. XBIBSTYLE
  884. X
  885. XMACROPACK    These are the "required" options of ditroff.
  886. XOTHERMACS
  887. XDITROFFINIT
  888. X
  889. XCITINDEX    This is the "required" option of CITCMD.
  890. X
  891. XSPELLDICT    This is the "required" option of fix.
  892. X
  893. XMODSTYLE    These are the "required" options of style
  894. XHARDSTYLE    when caking %.mod, %.hard and %.long.
  895. XLONGSTYLE
  896. X
  897. XALLLBLOPTS    These macros warp up the "optional" options
  898. XALLBIBOPTS    (e.g. BIBOPTS) and the "required" options
  899. XALLLISTREFOPTS    (e.g. BIBINDEX and BIBSTYLE) of the respective
  900. XALLPICOPTS    commands.
  901. XALLTBLOPTS
  902. XALLEQNOPTS
  903. XALLDITROFFOPTS
  904. XALLSTYLEOPTS
  905. X
  906. XMORECMD        You can define any of these macros to replace
  907. XBIBCMD        the standard programs more, bib, pic, ditroff
  908. XPICCMD        and lookup (e.g. with less, refer, ideal,
  909. XDITROFFCMD    ditroff.q and lookindex). If you define the
  910. XCITCMD        macro LOCALDITROFF, you will get ditroff.q
  911. X        as default.
  912. X
  913. XMOREFLAG    If you define MORE or PRINTFLAG to be ^, files
  914. XPRINTFLAG    you run %1.%2.m(p) on will be deleted after the
  915. XINTFLAG        the command. If you define INTFLAG, intermediate
  916. X        files will be similarly deleted.
  917. X
  918. XFDIR        Directories to put final and intermediate files
  919. XIDIR        of ditroff in. The default is /tmp.
  920. SHAR_EOF
  921. if test 2178 -ne "`wc -c < 'Newtext.defs'`"
  922. then
  923.     echo shar: "error transmitting 'Newtext.defs'" '(should have been 2178 characters)'
  924. fi
  925. fi
  926. echo shar: "extracting 'Newtext.doc'" '(2265 characters)'
  927. if test -f 'Newtext.doc'
  928. then
  929.     echo shar: "will not over-write existing file 'Newtext.doc'"
  930. else
  931. sed 's/^X//' << \SHAR_EOF > 'Newtext.doc'
  932. XDocumentation for the cakefile Newtext.
  933. X
  934. XThis file explains what you can do with Newtext; the macros used by
  935. XNewtext are described in Newtext.defs.
  936. X
  937. XNewtext assumes that your document is in a file with a .orig or .frame
  938. Xsuffix; if the suffix is .frame it assumes that it is a skeleton
  939. Xwith .so statements including the "meat" of the document. In either case
  940. Xthe file should have a line containing the word NEED followed by a list
  941. Xof program names from the set lbl, bib, listrefs, pic, tbl and eqn.
  942. XThis line may be a ditroff comment (a line beginning with .\")
  943. Xand should preferably occur near the beginning of the file.
  944. X
  945. XThe targets available through Newtext are:
  946. X
  947. X%.laser:    Ditroff output, after putting %.orig through the listed
  948. X        preprocessors. (The names of the preprocessor commands
  949. X        and their options may be altered (see Newtext.defs).)
  950. X
  951. X%.refs:        The list of bib references in the document.
  952. X%.srefs:    %.refs sorted without duplicates.
  953. X%.cit:        %.srefs looked up in a source bibliography.
  954. X        This is useful for making a local copy of the
  955. X        necessary references, allowing faster retrieval.
  956. X%.chnr:        The output of checknr.
  957. X%.cheq:        The output of checkeq.
  958. X%.ol:        Outline for -me documents.
  959. X%.fix:        A pseudo-target to invoke fix, an ispell-type spelling
  960. X        corrector.
  961. X%.ispell:    A pseudo-target to invoke ispell.
  962. X%.spell:    A list of misspelled words in the document.
  963. X%.dict:        Questionable phrases used in the document.
  964. X%.style:    Readability indexes for the document.
  965. X%.astyle:    Readability indexes for every sentence in the document.
  966. X%.exp:        Expletives in the document (as defined by style(1)).
  967. X%.mod:        Moderately hard-to-read sentences in the document.
  968. X%.hard:        Hard-to-read sentences in the document.
  969. X%.long:        Long sentences in the document.
  970. X%.pass:        Sentences containing passives.
  971. X
  972. X%.all:        Run the most useful document analysis programs:
  973. X        %.spell, %.style, %.exp, %.mod, %.long, %.pass, %.dict
  974. X        and %.chnr.
  975. X
  976. X%.count:
  977. X%.ocount:    The number of words in a document, measured in two ways.
  978. X        %.count counts equations, references, programs etc
  979. X        as one word; %.ocount counts them as they appear.
  980. X
  981. X%.clean:    Remove the files generated from %.orig.
  982. X%.vclean:    Remove the files generated from %.frame.
  983. X
  984. Xclean:        Run %.clean for all %.orig.
  985. Xvclean:        Run %.vclean for all %.frame.
  986. SHAR_EOF
  987. if test 2265 -ne "`wc -c < 'Newtext.doc'`"
  988. then
  989.     echo shar: "error transmitting 'Newtext.doc'" '(should have been 2265 characters)'
  990. fi
  991. fi
  992. echo shar: "extracting 'Nuprolog'" '(452 characters)'
  993. if test -f 'Nuprolog'
  994. then
  995.     echo shar: "will not over-write existing file 'Nuprolog'"
  996. else
  997. sed 's/^X//' << \SHAR_EOF > 'Nuprolog'
  998. X#ifndef    NC
  999. X#define    NC        nc
  1000. X#endif
  1001. X#ifndef    NCFLAGS
  1002. X#define    NCFLAGS
  1003. X#endif
  1004. X#ifndef    NITFLAGS
  1005. X#define    NITFLAGS
  1006. X#endif
  1007. X#ifndef    LDFLAGS
  1008. X#define    LDFLAGS
  1009. X#endif
  1010. X
  1011. X%.no:    %.ns
  1012. X    NC NCFLAGS -c %.ns
  1013. X
  1014. X%.ns^:    %.nl
  1015. X    NC NCFLAGS -S %.nl
  1016. X
  1017. X#define    LINK_CMD    NC LDFLAGS -o %
  1018. X#define    CHECK_CMD    nit NITFLAGS
  1019. X#define    TAGS_CMD    ptags
  1020. X
  1021. X#define    SRCSUFF    .nl
  1022. X#define    OBJSUFF .no
  1023. X
  1024. X#ifndef    SUFFIXLIST
  1025. X#ifdef    USE_DCGS
  1026. X#define    SUFFIXLIST    .nl .??
  1027. X#else
  1028. X#define    SUFFIXLIST    .nl
  1029. X#endif
  1030. X#endif
  1031. SHAR_EOF
  1032. if test 452 -ne "`wc -c < 'Nuprolog'`"
  1033. then
  1034.     echo shar: "error transmitting 'Nuprolog'" '(should have been 452 characters)'
  1035. fi
  1036. fi
  1037. echo shar: "extracting 'Rcs'" '(853 characters)'
  1038. if test -f 'Rcs'
  1039. then
  1040.     echo shar: "will not over-write existing file 'Rcs'"
  1041. else
  1042. sed 's/^X//' << \SHAR_EOF > 'Rcs'
  1043. X$    Cakefile for RCS.
  1044. X
  1045. X$    If you include this cakefile, every file you to update will
  1046. X$    be checked if it can be retrieved from the RCS directory,
  1047. X$    using co with the macro GETFLAGS as argument (default is -u).
  1048. X$    You can check out files explicitly, in which case the argument
  1049. X$    is COFLAG (default -l), and check in files, using ci, CIFLAGS
  1050. X$    and CIMSG (both defaults empty). The targets get, co and ci
  1051. X$    perform the respective action for all RCS files.
  1052. X
  1053. X#ifndef    GETFLAGS
  1054. X#define    GETFLAGS     -u
  1055. X#endif
  1056. X#ifndef    COFLAGS
  1057. X#define    COFLAGS     -l
  1058. X#endif
  1059. X#ifndef    CIFLAGS
  1060. X#define    CIFLAGS
  1061. X#endif
  1062. X#ifndef    CIMSG
  1063. X#define    CIMSG
  1064. X#endif
  1065. X
  1066. X%:    RCS/%,v            if exist RCS/%,v
  1067. X    co GETFLAGS %
  1068. X
  1069. X%.co&:    RCS/%,v            if exist RCS/%,v
  1070. X    co COFLAGS %
  1071. X
  1072. X%.ci&:    %            if exist RCS/%,v
  1073. X    ci CIFLAGS CIMSG %
  1074. X
  1075. Xget&:    [[sub RCS/X,v X RCS/*]]
  1076. X
  1077. Xco&:    [[sub RCS/X,v X.co RCS/*]]
  1078. X
  1079. Xci&:    [[sub RCS/X,v X.ci RCS/*]]
  1080. SHAR_EOF
  1081. if test 853 -ne "`wc -c < 'Rcs'`"
  1082. then
  1083.     echo shar: "error transmitting 'Rcs'" '(should have been 853 characters)'
  1084. fi
  1085. fi
  1086. echo shar: "extracting 'Sccs'" '(315 characters)'
  1087. if test -f 'Sccs'
  1088. then
  1089.     echo shar: "will not over-write existing file 'Sccs'"
  1090. else
  1091. sed 's/^X//' << \SHAR_EOF > 'Sccs'
  1092. X$    Cakefile for SCCS.
  1093. X
  1094. X$    If you include this cakefile, every file you to update will
  1095. X$    be checked if it can be retrieved from the SCCS directory,
  1096. X$    using sccs get with the macro GETFLAGS as argument (default
  1097. X$    is empty).
  1098. X
  1099. X#ifndef    GETFLAGS
  1100. X#define    GETFLAGS
  1101. X#endif
  1102. X
  1103. X%:    SCCS/s.%        if exist SCCS/s.%
  1104. X    sccs get GETFLAGS %
  1105. SHAR_EOF
  1106. if test 315 -ne "`wc -c < 'Sccs'`"
  1107. then
  1108.     echo shar: "error transmitting 'Sccs'" '(should have been 315 characters)'
  1109. fi
  1110. fi
  1111. echo shar: "extracting 'System'" '(3459 characters)'
  1112. if test -f 'System'
  1113. then
  1114.     echo shar: "will not over-write existing file 'System'"
  1115. else
  1116. sed 's/^X//' << \SHAR_EOF > 'System'
  1117. X$    Cakefile to handle programs.
  1118. X
  1119. X$    Using System is appropriate if a directory contains the sources
  1120. X$    for more than one binary; if the number of binaries is one,
  1121. X$    you should use the cakefile Main. System (and Main) can handle
  1122. X$    programs written in any language, as long as the cakefile
  1123. X$    for that language defines the macros expected by System. These
  1124. X$    macros are LINK_CMD, SRCSUFF, OBJSUFF and SUFFIXLIST. Currently
  1125. X$    there exist cakefiles for C and NU-Prolog. These cakefile should
  1126. X$    be included before System.
  1127. X
  1128. X$    System is intended to behave like Main; for basic documentation
  1129. X$    see Main. The difference is that whereas the configuration of
  1130. X$    a program can be given to Main as a single macro (FILES), a
  1131. X$    file is needed to convey it to System. This file is named by the
  1132. X$    macro CONF (default Conf). Each line of this file has on it
  1133. X$    first, the name of the binary, second, a list of the names
  1134. X$    of the sourcefiles that make up this binary (the source names
  1135. X$    should not have the language-specific suffix; i.e. you should
  1136. X$    strip the .c from the names of C source files).
  1137. X
  1138. X$    The target available with System are much the same as with Main.
  1139. X$    The difference is that they are available in two versions.
  1140. X$    When they are prefixed by the name of a binary, they apply
  1141. X$    only to that binary; when they are not prefixed, they apply
  1142. X$    to all binaries. For example, cake bin.lint runs CHECK_CMD on
  1143. X$    the sources for the binary bin, while cake lint runs it on
  1144. X$    the sources for all the binaries, using one run of CHECK_CMD
  1145. X$    per binary.
  1146. X
  1147. X#ifndef    PRINT_CMD
  1148. X#define    PRINT_CMD    lpr -p
  1149. X#endif
  1150. X#ifndef    INST_CMD
  1151. X#define    INST_CMD    cp
  1152. X#endif
  1153. X#ifndef    RM_CMD
  1154. X#define    RM_CMD        rmv
  1155. X#endif
  1156. X
  1157. X#ifndef    LIB
  1158. X#define    LIB
  1159. X#endif
  1160. X
  1161. X#ifndef    CONF
  1162. X#define    CONF        Conf
  1163. X#endif
  1164. X
  1165. X#define    MAINS        [[mainfile "" CONF]]
  1166. X#define    FILES(x)    [[extract x "" CONF]]
  1167. X#define    SRC(x)        [[extract x SRCSUFF CONF]]
  1168. X#define    OBJ(x)        [[extract x OBJSUFF CONF]]
  1169. X#define    ALLFILES    [[extract "" "" CONF | sort -u]]
  1170. X#define    ALLSRC        [[extract "" SRCSUFF CONF | sort -u]]
  1171. X#define    ALLOBJ        [[extract "" OBJSUFF CONF | sort -u]]
  1172. X
  1173. Xxyzzy&::    MAINS
  1174. X
  1175. X%:        OBJ(%)            if % in MAINS
  1176. X        LINK_CMD OBJ(%) LIB
  1177. X
  1178. X#ifdef    DEST
  1179. X%.install&:    %            if % in MAINS
  1180. X        INST_CMD % DEST
  1181. X#else
  1182. X#ifdef    HOME
  1183. X%.install&:    %            if % in MAINS
  1184. X        INST_CMD % HOME/bin
  1185. X#else
  1186. X#define    NOINSTALL
  1187. X#endif
  1188. X#endif
  1189. X
  1190. X#ifndef    NOINSTALL
  1191. Xinstall&:    [[mainfile .install CONF]]
  1192. X#endif
  1193. X
  1194. X#ifdef    CHECK_CMD
  1195. X#ifdef    IRREL
  1196. X%.lint&:    SRC(%)            if % in MAINS
  1197. X        CHECK_CMD SRC(%) LIB |& irrel IRREL
  1198. X#else
  1199. X%.lint&:    SRC(%)            if % in MAINS
  1200. X        CHECK_CMD SRC(%) LIB
  1201. X#endif
  1202. X
  1203. Xlint&:        [[mainfile .lint CONF]]
  1204. X#endif
  1205. X
  1206. X%.print&:                if % in MAINS
  1207. X        PRINT_CMD [[usrc SUFFIXLIST FILES(%)]]
  1208. X        @-touch .print.%
  1209. X
  1210. X%.uprint&:                if % in MAINS
  1211. X        PRINT_CMD [[later .print.% [[usrc SUFFIXLIST FILES(%)]]]]
  1212. X        @-touch .print.%
  1213. X
  1214. Xprint&:
  1215. X        PRINT_CMD [[usrc SUFFIXLIST ALLFILES]]
  1216. X        @-touch .print
  1217. X
  1218. Xuprint&:
  1219. X        PRINT_CMD [[later .print [[usrc SUFFIXLIST ALLFILES]]]]
  1220. X        @-touch .print
  1221. X
  1222. X#ifdef    TAGS_CMD
  1223. Xtags:        ALLSRC
  1224. X        TAGS_CMD ALLSRC
  1225. X#endif
  1226. X
  1227. X#ifdef    DEFS_CMD
  1228. Xdefs:        ALLSRC
  1229. X        DEFS_CMD ALLSRC > defs
  1230. X#endif
  1231. X
  1232. X%.count&:                if % in MAINS
  1233. X        wc -v [[usrc SUFFIXLIST FILES(%)]]
  1234. X
  1235. X%.ssize&:                if % in MAINS
  1236. X        ssize [[usrc SUFFIXLIST FILES(%)]]
  1237. X
  1238. Xcount&:
  1239. X        wc -v [[usrc SUFFIXLIST ALLFILES]]
  1240. X
  1241. Xssize&:
  1242. X        ssize [[usrc SUFFIXLIST ALLFILES]]
  1243. X
  1244. X%.clean&:                if % in MAINS
  1245. X        RM_CMD OBJ(%) [[gsrc SUFFIXLIST FILES(%)]]
  1246. X
  1247. X%.clobber&:    %.clean            if % in MAINS
  1248. X        RM_CMD %
  1249. X
  1250. Xclean&:
  1251. X        RM_CMD ALLOBJ [[gsrc SUFFIXLIST ALLFILES]]
  1252. X
  1253. Xclobber&:    clean
  1254. X        RM_CMD MAINS
  1255. SHAR_EOF
  1256. if test 3459 -ne "`wc -c < 'System'`"
  1257. then
  1258.     echo shar: "error transmitting 'System'" '(should have been 3459 characters)'
  1259. fi
  1260. fi
  1261. echo shar: "extracting 'Text'" '(7149 characters)'
  1262. if test -f 'Text'
  1263. then
  1264.     echo shar: "will not over-write existing file 'Text'"
  1265. else
  1266. sed 's/^X//' << \SHAR_EOF > 'Text'
  1267. X$    Obsolete cakefile for text processing.
  1268. X
  1269. X$    Use Newtext instead.
  1270. X
  1271. X#ifndef    NOSPACE
  1272. X#define    SPACE
  1273. X#endif
  1274. X
  1275. X#ifndef    MPAC
  1276. X#define    MPAC    -me
  1277. X#endif
  1278. X#ifndef    LBLOPTS
  1279. X#define    LBLOPTS
  1280. X#endif
  1281. X#ifndef    ROFFOPTS
  1282. X#define    ROFFOPTS
  1283. X#endif
  1284. X#ifndef    BIBPROG
  1285. X#define    BIBPROG    bib
  1286. X#endif
  1287. X#ifndef    LASDEV
  1288. X#define    LASDEV    -Pip
  1289. X#endif
  1290. X#ifndef    PAGER
  1291. X#define    PAGER    more
  1292. X#endif
  1293. X#ifndef    PRINT
  1294. X#define    PRINT    lpr
  1295. X#endif
  1296. X#ifndef    PNDK
  1297. X#define    PNDK    -Pcl
  1298. X#endif
  1299. X#ifndef    PLASER
  1300. X#define    PLASER    LASDEV -n
  1301. X#endif
  1302. X#ifndef    PGEN
  1303. X#define    PGEN    -Pbds
  1304. X#endif
  1305. X
  1306. X#define    need(prog)    prog in [[needed %.orig]]
  1307. X
  1308. X#ifdef    SPACE
  1309. X#ifndef    IDIR
  1310. X#define    IDIR    /tmp/
  1311. X#endif
  1312. X#ifndef    FDIR
  1313. X#define    FDIR    /tmp/
  1314. X#endif
  1315. X#ifndef    ADIR
  1316. X#define    ADIR
  1317. X#endif
  1318. X#define    ISUFF    lbl bib dte de d ne n base
  1319. X#define    FSUFF    laser more nice fine
  1320. X#define    ASUFF    refs cit chnr cheq ol spell double dict style astyle exp hard mod long pass count Count
  1321. X#define    NOSUFF    frame orig all fix clean vclean
  1322. X#else
  1323. X#define    IDIR
  1324. X#define    FDIR
  1325. X#define    ADIR
  1326. X#endif
  1327. X
  1328. X/* general services */
  1329. X#ifndef    SPACE
  1330. X%1.%2.m&:    %1.%2
  1331. X        PAGER %1.%2
  1332. X
  1333. X#ifdef    CHUNK
  1334. X%1.%2.p&:    %1.%2                if %2 in laser
  1335. X        -@/bin/rm chunk*
  1336. X        troffchunk -n 6 %1.%2
  1337. X        PRINT PLASER chunk*
  1338. X#else
  1339. X%1.%2.p&:    %1.%2                if %2 in laser
  1340. X        PRINT PLASER %1.%2
  1341. X#endif
  1342. X
  1343. X%1.%2.p&:    %1.%2                if %2 in fine nice
  1344. X        PRINT PNDK %1.%2
  1345. X
  1346. X%1.%2.p&:    %1.%2                if not %2 in laser fine nice
  1347. X        PRINT PGEN %1.%2
  1348. X
  1349. X#else
  1350. X%1.%2.m&:    %1.%2                if %2 in NOSUFF
  1351. X        PAGER %1.%2
  1352. X
  1353. X%1.%2.m&:    IDIR/**/%1.%2            if %2 in ISUFF
  1354. X        PAGER IDIR/**/%1.%2
  1355. X
  1356. X%1.%2.m&:    FDIR/**/%1.%2            if %2 in FSUFF
  1357. X        PAGER FDIR/**/%1.%2
  1358. X
  1359. X%1.%2.m&:    ADIR/**/%1.%2            if %2 in ASUFF
  1360. X        PAGER ADIR/**/%1.%2
  1361. X
  1362. X%1.%2.p&:    %1.%2                if %2 in NOSUFF
  1363. X        PRINT PGEN %1.%2
  1364. X
  1365. X%1.%2.p&:    IDIR/**/%1.%2            if %2 in ISUFF
  1366. X        PRINT PGEN IDIR/**/%1.%2
  1367. X
  1368. X#ifdef    CHUNK
  1369. X%1.%2.p&:    FDIR/**/%1.%2            if %2 in laser
  1370. X        -@/bin/rm -f chunk*
  1371. X        troffchunk -n 6 FDIR/**/%1.%2
  1372. X        PRINT PLASER chunk*
  1373. X#else
  1374. X%1.%2.p&:    FDIR/**/%1.%2            if %2 in laser
  1375. X        PRINT PLASER FDIR/**/%1.%2
  1376. X#endif
  1377. X
  1378. X%1.%2.p&:    FDIR/**/%1.%2            if %2 in more
  1379. X        PRINT PGEN FDIR/**/%1.%2
  1380. X
  1381. X%1.%2.p&:    FDIR/**/%1.%2            if %2 in fine nice
  1382. X        PRINT PNDK FDIR/**/%1.%2
  1383. X
  1384. X%1.%2.p&:    ADIR/**/%1.%2            if %2 in ASUFF
  1385. X        PRINT PGEN ADIR/**/%1.%2
  1386. X#endif
  1387. X
  1388. X#ifdef    SPACE
  1389. X%1.%2&:        IDIR/**/%1.%2            if %2 in ISUFF and {{nonnull IDIR}} and not {{sub X1/X2 NULL %1 >& /dev/null}}
  1390. X%1.%2&:        FDIR/**/%1.%2            if %2 in FSUFF and {{nonnull FDIR}} and not {{sub X1/X2 NULL %1 >& /dev/null}}
  1391. X%1.%2&:        ADIR/**/%1.%2            if %2 in ASUFF and {{nonnull ADIR}} and not {{sub X1/X2 NULL %1 >& /dev/null}}
  1392. X#endif
  1393. X
  1394. X/* soelim */
  1395. X%.orig:        %.frame [[soincl %.frame]]    if exist %.frame
  1396. X        soelim %.frame > %.orig
  1397. X
  1398. X/* lbl */
  1399. XIDIR/**/%.lbl^:    %.orig*                if need(lbl)
  1400. X        lbl LBLOPTS %.orig > IDIR/**/%.lbl
  1401. X
  1402. XIDIR/**/%.lbl^:    %.orig*                if not need(lbl)
  1403. X        @/bin/rm -f IDIR/**/%.lbl
  1404. X        ln -s [[/bin/pwd]]/%.orig IDIR/**/%.lbl
  1405. X
  1406. X/* bib */
  1407. XIDIR/**/%.bib^:    IDIR/**/%.lbl %.orig* BIB    if need(bib)
  1408. X        BIBPROG -p/**/BIBS -t/**/STYLE IDIR/**/%.lbl > IDIR/**/%.bib
  1409. X
  1410. XIDIR/**/%.bib^:    IDIR/**/%.lbl %.orig*        if need(listrefs)
  1411. X        listrefs -t/**/STYLE IDIR/**/%.lbl > IDIR/**/%.bib
  1412. X
  1413. XIDIR/**/%.bib^:    IDIR/**/%.lbl %.orig*        if not need(bib) and not need(listrefs)
  1414. X        @/bin/rm -f IDIR/**/%.bib
  1415. X        ln -s IDIR/**/%.lbl IDIR/**/%.bib
  1416. X
  1417. X/* laser pic */
  1418. XIDIR/**/%.dte^:    IDIR/**/%.bib %.orig*        if need(pic)
  1419. X        pic LASDEV PMAC IDIR/**/%.bib > IDIR/**/%.dte
  1420. X
  1421. XIDIR/**/%.dte^:    IDIR/**/%.bib %.orig*        if not need(pic)
  1422. X        @/bin/rm -f IDIR/**/%.dte
  1423. X        ln -s IDIR/**/%.bib IDIR/**/%.dte
  1424. X    
  1425. X/* laser tbl */
  1426. XIDIR/**/%.de^:    IDIR/**/%.dte %.orig*        if need(tbl)
  1427. X        dtbl LASDEV IDIR/**/%.dte > IDIR/**/%.de
  1428. X
  1429. XIDIR/**/%.de^:    IDIR/**/%.dte %.orig*        if not need(tbl)
  1430. X        @/bin/rm -f IDIR/**/%.de
  1431. X        ln -s IDIR/**/%.dte IDIR/**/%.de
  1432. X    
  1433. X/* laser eqn */
  1434. XIDIR/**/%.d^:    IDIR/**/%.de %.orig*        if need(eqn)
  1435. X        deqn LASDEV EMAC IDIR/**/%.de > IDIR/**/%.d
  1436. X
  1437. XIDIR/**/%.d^:    IDIR/**/%.de %.orig*        if not need(eqn)
  1438. X        @/bin/rm -f IDIR/**/%.d
  1439. X        ln -s IDIR/**/%.de IDIR/**/%.d
  1440. X    
  1441. X/* laser troff */
  1442. XFDIR/**/%.laser:IDIR/**/%.d
  1443. X        ditroff -t LASDEV ROFFOPTS MPAC IMAGEN SIMLAS TMAC IDIR/**/%.d > FDIR/**/%.laser
  1444. X
  1445. X/* ndk tbl */
  1446. XIDIR/**/%.ne^:    IDIR/**/%.bib %.orig*        if need(tbl)
  1447. X        tbl IDIR/**/%.bib > IDIR/**/%.ne
  1448. X
  1449. XIDIR/**/%.ne^:    IDIR/**/%.bib %.orig*        if not need(tbl)
  1450. X        @/bin/rm -f IDIR/**/%.ne
  1451. X        ln -s IDIR/**/%.bib IDIR/**/%.ne
  1452. X    
  1453. X/* ndk eqn */
  1454. XIDIR/**/%.n^:    IDIR/**/%.ne %.orig*        if need(eqn)
  1455. X        neqn EMAC IDIR/**/%.ne > IDIR/**/%.n
  1456. X
  1457. XIDIR/**/%.n^:    IDIR/**/%.ne %.orig*        if not need(eqn)
  1458. X        @/bin/rm -f IDIR/**/%.n
  1459. X        ln -s IDIR/**/%.ne IDIR/**/%.n
  1460. X    
  1461. X/* ndk nroff */
  1462. XFDIR/**/%.more:    IDIR/**/%.n
  1463. X        nroff ROFFOPTS MPAC SIMNDK TMAC IDIR/**/%.n > FDIR/**/%.more
  1464. X
  1465. XFDIR/**/%.nice:    IDIR/**/%.n
  1466. X        nroff -F -e -TNDK12 ROFFOPTS MPAC SIMNDK TMAC IDIR/**/%.n > IDIR/**/%.tmp
  1467. X        @ndk -igrs IDIR/**/%.tmp | expand > FDIR/**/%.nice
  1468. X        @/bin/rm -f IDIR/**/%.tmp
  1469. X
  1470. XFDIR/**/%.fine:    IDIR/**/%.n
  1471. X        nroff -F -e -TNDK10 ROFFOPTS MPAC SIMNDK TMAC IDIR/**/%.n > IDIR/**/%.tmp
  1472. X        @ndk -irs IDIR/**/%.tmp | expand > FDIR/**/%.fine
  1473. X        @/bin/rm -f IDIR/**/%.tmp
  1474. X
  1475. X/* analysis services */
  1476. X%.all&:        %.spell %.double %.style %.exp %.mod %.long %.pass %.dict %.chnr
  1477. X
  1478. XIDIR/**/%.base^:%.orig*
  1479. X        base < %.orig | sed -e 's/XXX//g' > IDIR/**/%.base
  1480. X
  1481. XADIR/**/%.refs:    %.orig*
  1482. X        refs < %.orig | tr ',' '\\\\012' | sed -e 's/^ *//' | sort -u > ADIR/**/%.refs
  1483. X
  1484. XADIR/**/%.cit:    %.refs
  1485. X        lookup -p/**/BIBS < %.refs > ADIR/**/%.icit
  1486. X        @gred "No references found." ADIR/**/%.icit
  1487. X        sortbib ADIR/**/%.icit > ADIR/**/%.cit
  1488. X        @/bin/rm ADIR/**/%.icit
  1489. X
  1490. XADIR/**/%.chnr:    %.orig*
  1491. X        checknr CHNROPTS TMAC %.orig > ADIR/**/%.chnr
  1492. X
  1493. XADIR/**/%.cheq:    %.orig*
  1494. X        -checkeq CHEQOPTS EMAC %.orig > ADIR/**/%.cheq
  1495. X
  1496. XADIR/**/%.ol:    %.orig*
  1497. X        ol %.orig > ADIR/**/%.ol
  1498. X
  1499. X%.fix&:        %.orig*
  1500. X        fix -d DICT %.orig
  1501. X
  1502. XADIR/**/%.double:%.orig*
  1503. X        double %.orig > ADIR/**/%.double
  1504. X
  1505. XADIR/**/%.spell:IDIR/**/%.base
  1506. X        spell SPELLOPTS IDIR/**/%.base | tr A-Z a-z | comm -23 - DICT > ADIR/**/%.spell
  1507. X
  1508. XADIR/**/%.dict:    IDIR/**/%.base
  1509. X        diction IDIR/**/%.base > ADIR/**/%.dict
  1510. X
  1511. XADIR/**/%.style:IDIR/**/%.base
  1512. X        style MPAC STYLEOPTS IDIR/**/%.base > ADIR/**/%.style
  1513. X
  1514. XADIR/**/%.astyle:IDIR/**/%.base
  1515. X        style MPAC STYLEOPTS -a IDIR/**/%.base > ADIR/**/%.astyle
  1516. X
  1517. XADIR/**/%.exp:    IDIR/**/%.base
  1518. X        style MPAC STYLEOPTS -e IDIR/**/%.base > ADIR/**/%.exp
  1519. X
  1520. XADIR/**/%.hard:    IDIR/**/%.base
  1521. X        style MPAC STYLEOPTS -r HARD IDIR/**/%.base > ADIR/**/%.hard
  1522. X
  1523. XADIR/**/%.mod:    IDIR/**/%.base
  1524. X        style MPAC STYLEOPTS -r MOD IDIR/**/%.base > ADIR/**/%.mod
  1525. X
  1526. XADIR/**/%.long:    IDIR/**/%.base
  1527. X        style MPAC STYLEOPTS -l LONG IDIR/**/%.base > ADIR/**/%.long
  1528. X
  1529. XADIR/**/%.pass:    IDIR/**/%.base
  1530. X        style MPAC STYLEOPTS -p IDIR/**/%.base > ADIR/**/%.pass
  1531. X
  1532. XADIR/**/%.count:IDIR/**/%.base
  1533. X        deroff IDIR/**/%.base | wc > ADIR/**/%.count
  1534. X
  1535. XADIR/**/%.ocount:%.orig*
  1536. X        wc %.orig > ADIR/**/%.ocount
  1537. X
  1538. X%.clean&:
  1539. X        @echo cleaning up %
  1540. X        -@/bin/rm %.spell %.style %.astyle >& /dev/null
  1541. X        -@/bin/rm %.exp %.hard %.mod %.long %.pass >& /dev/null
  1542. X        -@/bin/rm %.dict %.count %.ocount %.base >& /dev/null
  1543. X        -@/bin/rm %.refs %.double %.ol %.chnr %.cheq >& /dev/null
  1544. X        -@/bin/rm %.dte %.de %.d %.ne %.n >& /dev/null
  1545. X        -@/bin/rm %.laser %.nice %.fine %.more >& /dev/null
  1546. X
  1547. X%.vclean&:
  1548. X        @echo cleaning up % very carefully
  1549. X        -@/bin/mv %.orig /tmp/%.orig.$$ >& /dev/null
  1550. X
  1551. Xclean&:        [[sub -i X.orig X.clean *]]
  1552. Xclean&:        [[sub -i X.frame X.vclean *]]
  1553. SHAR_EOF
  1554. if test 7149 -ne "`wc -c < 'Text'`"
  1555. then
  1556.     echo shar: "error transmitting 'Text'" '(should have been 7149 characters)'
  1557. fi
  1558. fi
  1559. echo shar: "extracting 'Textdefs'" '(1276 characters)'
  1560. if test -f 'Textdefs'
  1561. then
  1562.     echo shar: "will not over-write existing file 'Textdefs'"
  1563. else
  1564. sed 's/^X//' << \SHAR_EOF > 'Textdefs'
  1565. X$    This is a guide to the definitions needed by the Cakefile Text.
  1566. X
  1567. X#define    BIBDIR    /* pathname of your bibliography (90x)        */
  1568. X#define    LIBDIR    /* pathname of your library (both)        */
  1569. X
  1570. X/* the following are on the 3240 */
  1571. X#define    TMAC    /* pathname of your nroff/troff macros        */
  1572. X#define    EMAC    /* pathname of your equation macros        */
  1573. X#define    PMAC    /* pathname of your troff macros for pic    */
  1574. X
  1575. X#define    IMAGEN    /* pathname of your troff macros for imagen    */
  1576. X#define    SIMLAS    /* pathname of your symbol macros for imagen    */
  1577. X#define    SIMNDK    /* pathname of your symbol macros for ndk    */
  1578. X
  1579. X/* the following are on the 90x */
  1580. X#define    DICT    /* pathname of your spell dictionary        */
  1581. X#define    STYLE    /* pathname of your bib style file        */
  1582. X
  1583. X#define    SPELLOPTS    /* any spell options you wish, e.g. -b    */
  1584. X#define    STYLEOPTS    /* any extra style options you wish    */
  1585. X#define    CHNROPTS    /* any checknr options you wish        */
  1586. X#define    CHEQOPTS    /* any checkeq options you wish        */
  1587. X#define    ROFFOPTS    /* any extra xroff options (eg -o12-)    */
  1588. X
  1589. X#define    HARD        /* Readability Index you consider hard    */
  1590. X#define    MOD        /* RI you consider moderately hard    */
  1591. X#define    LONG        /* length of too long sentences        */
  1592. X
  1593. X#define    BIB    /* pathname of your own personal bibliography    */
  1594. X#define    BIBS    /* list of pathnames of bibliographies for bib    */
  1595. SHAR_EOF
  1596. if test 1276 -ne "`wc -c < 'Textdefs'`"
  1597. then
  1598.     echo shar: "error transmitting 'Textdefs'" '(should have been 1276 characters)'
  1599. fi
  1600. fi
  1601. echo shar: "extracting 'Uas'" '(170 characters)'
  1602. if test -f 'Uas'
  1603. then
  1604.     echo shar: "will not over-write existing file 'Uas'"
  1605. else
  1606. sed 's/^X//' << \SHAR_EOF > 'Uas'
  1607. X$    Cakefile for the uas machine-independent microassembler.
  1608. X
  1609. X#ifndef    UASOPTS
  1610. X#define    UASOPTS
  1611. X#endif
  1612. X
  1613. X%.uo %.ul %.um:    [[uarch %.us]] %.us
  1614. X        uas UASOPTS [[uarch %.us]] %.us
  1615. SHAR_EOF
  1616. if test 170 -ne "`wc -c < 'Uas'`"
  1617. then
  1618.     echo shar: "error transmitting 'Uas'" '(should have been 170 characters)'
  1619. fi
  1620. fi
  1621. echo shar: "extracting 'Vlsi'" '(2395 characters)'
  1622. if test -f 'Vlsi'
  1623. then
  1624.     echo shar: "will not over-write existing file 'Vlsi'"
  1625. else
  1626. sed 's/^X//' << \SHAR_EOF > 'Vlsi'
  1627. X$    Cakefile for VLSI
  1628. X$    by Raymond Leung
  1629. X$    University of New South Wales
  1630. X
  1631. X#ifndef    plotter
  1632. X#    define    plotter        $TERM
  1633. X#endif    plotter
  1634. X
  1635. X#ifndef    lambda
  1636. X#    define    lambda        2.5
  1637. X#endif    lambda
  1638. X
  1639. X#ifndef    layers
  1640. X#    define    layers        d
  1641. X#endif    layers
  1642. X
  1643. X#ifndef    PLOTSITE
  1644. X#    define    PLOTCMD
  1645. X#else
  1646. X#    define    PLOTCMD        | lpr PLOTSITE
  1647. X#endif
  1648. X
  1649. X#define    CADLIB    /cad/lib
  1650. X
  1651. X$===================================================================
  1652. X
  1653. Xhelp&:
  1654. X        @cat /cad/lib/bake.help
  1655. X
  1656. X%.tt:        %.fdl
  1657. X        fidel < %.fdl > %.tt
  1658. X
  1659. X%.sl:        %.tt                if exist %.fdl
  1660. X        spla -t nmos -o % %.tt;
  1661. X
  1662. X%.pla&:        %.tt
  1663. X        spla -t nmos -o % %.tt;
  1664. X        @echo "PLA is in file %.sl"
  1665. X
  1666. X%.cif:        %.sl
  1667. X        jigsaw %
  1668. X
  1669. X%.slplot&:    %.sl
  1670. X        slplot -t plotter % PLOTCMD
  1671. X
  1672. X%.cif:        %.kic
  1673. X        (echo lambda; echo %.kic; echo layers) | kictocif | grep -s succ
  1674. X
  1675. X%.root&:    %.cif
  1676. X        (echo n; echo lambda; echo %.cif) | ciftokic | grep -s succ
  1677. X
  1678. X%.plot&:    %.cif
  1679. X        @echo "Try 'bake %.cplot'"; exit 1
  1680. X
  1681. X%.cplot&:    %.cif
  1682. X        cifplot -t plotter -h %.cif %.cif PLOTCMD
  1683. X
  1684. X%.sim:        %.cif
  1685. X        galah %.cif
  1686. X        @-grep -v '^|' < %.sim | tr " " "\012" | grep '#' | sort -u > %.x2
  1687. X        @-if [ -s %.x2 ]; then \
  1688. X            echo many nodes, one name:; cat %.x2 \
  1689. X          else \
  1690. X            echo \
  1691. X          fi
  1692. X        @-if [ -s %.al ]; then \
  1693. X            echo many names, one node:; cat %.al \
  1694. X          else \
  1695. X            echo \
  1696. X          fi
  1697. X
  1698. X%.tout:        %.tin %.sim
  1699. X        trek %.sim < %.tin
  1700. X
  1701. X%.tplot&:    %.tout
  1702. X        simplot -t plotter -h % %.tout PLOTCMD
  1703. X
  1704. X%.tprint:    %.tout            if not exist %.f
  1705. X        simprint %.tout > %.tprint
  1706. X
  1707. X%.tprint:    %.tout %.f        if exist %.f
  1708. X        simprint -f %.f %.tout > %.tprint
  1709. X
  1710. X%.spice %.names:    %.sim
  1711. X        simtospice %.sim
  1712. X
  1713. X%.spint:    %.sim
  1714. X        runspice -n %
  1715. X
  1716. X%.spout:    %.spice %.spin %.names
  1717. X        runspice %
  1718. X        @echo
  1719. X        @echo "Spice finished" 
  1720. X
  1721. X%.splot&:    %.spout
  1722. X        schange % | simplot -t plotter -h % PLOTCMD
  1723. X
  1724. X%.ssplot&:    %.spout
  1725. X        spiceplot -t plotter %.spout PLOTCMD
  1726. X
  1727. X%.sprint:    %.spout            if not exist %.f
  1728. X        schange % | simprint > %.sprint
  1729. X
  1730. X%.sprint:    %.spout %.f        if exist %.f
  1731. X        schange % | simprint -f %.f > %.sprint
  1732. X
  1733. X%.box:        %.cif
  1734. X        ciftobox %.cif > %.box
  1735. X
  1736. X%.vplot&:    %.vout
  1737. X        vchange %.vout | simplot -t plotter -h % PLOTCMD
  1738. X
  1739. X%.vprint:    %.vout            if not exist %.f
  1740. X        vchange %.vout | simprint > %.vprint
  1741. X
  1742. X%.vprint:    %.vout %.f        if exist %.f
  1743. X        vchange %.vout | simprint -f %.f > %.vprint
  1744. X
  1745. X%.aout:        %.ain %.sim
  1746. X        asim %.sim < %.ain
  1747. X
  1748. X%.aplot&:    %.aout
  1749. X        simplot -t plotter -h % %.aout PLOTCMD
  1750. X
  1751. Xclean&:
  1752. X        -/bin/rm *.log *.rec *.drc *.def *.list *.names *.temp *.nodes cifplot.kic *[0-9][0-9][0-9] >& /dev/null
  1753. SHAR_EOF
  1754. echo shar: "1 control character may be missing from 'Vlsi'"
  1755. if test 2395 -ne "`wc -c < 'Vlsi'`"
  1756. then
  1757.     echo shar: "error transmitting 'Vlsi'" '(should have been 2395 characters)'
  1758. fi
  1759. fi
  1760. echo shar: "extracting 'Yacc'" '(548 characters)'
  1761. if test -f 'Yacc'
  1762. then
  1763.     echo shar: "will not over-write existing file 'Yacc'"
  1764. else
  1765. sed 's/^X//' << \SHAR_EOF > 'Yacc'
  1766. X$    Cakefile to handle yacc files.
  1767. X
  1768. X$    It renames the output file of yacc so that it has the same
  1769. X$    basename as the source file. The value of the macro YFLAGS
  1770. X$    is passed on to yacc.
  1771. X
  1772. X$    This cakefile was written to work with the cakefile C and one
  1773. X$    of the cakefiles Main and System.
  1774. X
  1775. X#ifndef    YFLAGS
  1776. X#define    YFLAGS    -d
  1777. X#endif
  1778. X
  1779. X%.c^ %.h@:    %.y            if exist %.y and "-d" in [[echo YFLAGS]]
  1780. X        yacc YFLAGS %.y
  1781. X        @mv y.tab.h %.h
  1782. X        @mv y.tab.c %.c
  1783. X
  1784. X%.c^:        %.y            if exist %.y and not "-d" in [[echo YFLAGS]]
  1785. X        yacc YFLAGS %.y
  1786. X        @mv y.tab.c %.c
  1787. X
  1788. X#define    USE_YACC
  1789. SHAR_EOF
  1790. if test 548 -ne "`wc -c < 'Yacc'`"
  1791. then
  1792.     echo shar: "error transmitting 'Yacc'" '(should have been 548 characters)'
  1793. fi
  1794. fi
  1795. echo shar: "extracting 'Zs_defs'" '(767 characters)'
  1796. if test -f 'Zs_defs'
  1797. then
  1798.     echo shar: "will not over-write existing file 'Zs_defs'"
  1799. else
  1800. sed 's/^X//' << \SHAR_EOF > 'Zs_defs'
  1801. X$    Site-dependent definitions for the obsolete cakefile Text.
  1802. X
  1803. X#ifdef    LW
  1804. X#define    LASDEV    -Plw
  1805. X#endif
  1806. X#ifdef    AN
  1807. X#define    LASDEV    -Pan
  1808. X#endif
  1809. X
  1810. X#define    LIBDIR    HOME/lib
  1811. X#define    BIBDIR    /usr/bib
  1812. X
  1813. X#define    TMAC    LIBDIR/tmac.e.zs
  1814. X#define    EMAC    LIBDIR/emac.zs
  1815. X#define    PMAC    LIBDIR/pmac.zs
  1816. X
  1817. X#define    IMAGEN    LIBDIR/imagen
  1818. X#define    SIMLAS    LIBDIR/Symbols.Imagen
  1819. X#define    SIMNDK    LIBDIR/Symbols.NDK
  1820. X
  1821. X#define    DICT    LIBDIR/dict
  1822. X#define    STYLE    LIBDIR/style
  1823. X
  1824. X#define    STYLEOPTS
  1825. X#define    SPELLOPTS    -b
  1826. X#define    CHEQOPTS
  1827. X#define    CHNROPTS
  1828. X
  1829. X#define    MOD    16
  1830. X#define    HARD    19
  1831. X#define    LONG    25
  1832. X
  1833. X#define    JAS    BIBDIR/jas/INDEX
  1834. X#define    LOGIC    BIBDIR/logic/INDEX
  1835. X#define    VLSI    BIBDIR/vlsi/INDEX
  1836. X#define    BIB    BIBDIR/zs/INDEX
  1837. X$define    BIBS    JAS,LOGIC,VLSI,BIB
  1838. X$define    BIBS    JAS,INDEX
  1839. X$define    BIBS    INDEX,JAS
  1840. X#define    BIBS    INDEX
  1841. SHAR_EOF
  1842. if test 767 -ne "`wc -c < 'Zs_defs'`"
  1843. then
  1844.     echo shar: "error transmitting 'Zs_defs'" '(should have been 767 characters)'
  1845. fi
  1846. fi
  1847. echo shar: "extracting 'Zs_newdefs'" '(379 characters)'
  1848. if test -f 'Zs_newdefs'
  1849. then
  1850.     echo shar: "will not over-write existing file 'Zs_newdefs'"
  1851. else
  1852. sed 's/^X//' << \SHAR_EOF > 'Zs_newdefs'
  1853. X$    Site-dependent definitions for the cakefile Newtext.
  1854. X
  1855. X#define    LIBDIR        /u/pgrad/zs/lib
  1856. X
  1857. X#define    DITROFFINIT    LIBDIR/init.me
  1858. X#define    SYMBOLIMAGEN    LIBDIR/Symbols.imagen
  1859. X#define    SYMBOLAPPLE    LIBDIR/Symbols.apple
  1860. X#define    OTHERMACS    LIBDIR/tmac.e.zs
  1861. X#define    EQNOPTS        LIBDIR/emac.zs
  1862. X#define    SPELLDICT    LIBDIR/dict
  1863. X#define    SPELLOPTS    -b
  1864. X#define    BIBSTYLE    -t LIBDIR/style
  1865. X
  1866. X#define    INTFLAG        ^
  1867. SHAR_EOF
  1868. if test 379 -ne "`wc -c < 'Zs_newdefs'`"
  1869. then
  1870.     echo shar: "error transmitting 'Zs_newdefs'" '(should have been 379 characters)'
  1871. fi
  1872. fi
  1873. exit 0
  1874. #    End of shell archive
  1875.